/**
 * Created by bgy on 2016/12/6.
 * 我的水果
 */
import React from 'react';
import {Link} from 'react-router';

class GoodsQualityComponent extends React.Component {

  constructor() {
    super();
    this.state = {
      //测试数据
      data: '这里是模拟的质检标准--模拟页面'
    };
    this.applyQualityTest = this.applyQualityTest.bind(this);
  }
  componentWillReceiveProps() {
    console.info(this.props);
    if(this.props['data-goodsId']){
      //拿到质检单位的质检标准
    }

  }
  applyQualityTest(){
    this.props.applyQualityTest(this.props['data-vendorGoodsId']);
  }
  render() {
    var applyQualityTest = this.applyQualityTest;
    return (
      <section className='quality-box'>
        <div className='quality-standard rel'>
          {this.state.data}
          这里用来放置质检标准
          <div className='qiality-footer'>
            <button onClick={applyQualityTest}>申请质检</button>
          </div>
        </div>

      </section>
    )
  }

}

export default GoodsQualityComponent;
